package com.bestom.bestoma10demo;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import android.widget.Toast;

/**
 * @author bestom
 * Monitor tethering state changes
 */
public class tetherReceiver extends BroadcastReceiver{
    @Override
    public void onReceive(Context context, Intent intent) {
        if ((intent.getAction()).equals("com.bestom.autostate")) {
            boolean auto_tethering_checked = intent.getBooleanExtra("tethered_checked", true);
            Log.i("tag", "tethered_checked:" + auto_tethering_checked);
            Toast.makeText(context.getApplicationContext(),"auto_tethering_checked status:" + auto_tethering_checked,Toast.LENGTH_SHORT).show();
        }
    }
}
